<template>
	<div class="page visit">
		<x-header class='header' slot="header" :left-options="{backText: ''}">就诊指导</x-header>
		<div class="top" style="height: 50px; width: 100%;"></div>

		<view-box>
			<group v-for="item in treatment_guidance">
				<cell :value="item.treatmentReason">
					<span slot="title" style="color:rgb(58,175,252);"><span style="vertical-align:middle;"></span>就诊原因</span>
				</cell>
				<cell :value="item.treatmentTime">
					<span slot="title" style="color:rgb(58,175,252);"><span style="vertical-align:middle;"></span>就诊时间</span>
				</cell>
				<cell :value="item.treatmentDepartment">
					<span slot="title" style="color:rgb(58,175,252);"><span style="vertical-align:middle;"></span>就诊科室</span>
				</cell>
				<cell :title="'注意事项:　' + item.treatmentNote" value="" style='padding: 4px 15px 10px;font-size: 14px; color: rgb(51,51,51);'></cell>
			</group>
		</view-box>
	</div>
</template>

<script>
	import Api from '@/api/index.js' //  引入api文件
	
	export default {
		data(){
			return {
				treatment_guidance: []
			}
		},
		created(){
			this.customer_id = localStorage.getItem('customer_id');
			this.getData();
		},
		methods:{
			getData(){   //  GET /improve/treatment_guidance/{customer_id}
				const treatment_guidanceApi = Api.treatment_guidanceApi + this.customer_id;  //  就诊指导
				this.$http.get(treatment_guidanceApi)
				.then(({data})=>{
					this.treatment_guidance = data.data;
					console.log(data)
				})
			}
		}
	}
	
	
</script>

<style lang="less" scoped>
	.visit {
		position: fixed !important;
		left: 0;
		top: 0;
		right: 0;
		background: #fff;
		z-index: 999;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
</style>